$(function(){
	//获取缓存中的id
	var id = localStorage.getItem('id');
	console.log(id);
	$.ajax({
		type: "post",
		data:{
			id:id
		},
		url: "http://a.91jfk.com/Product/Notice/PersonNewsDetailData",
		dataType: 'json',
		success: function(res) {
			console.log(res);
				var dzsj = get_Date(res.message.push_time);
				showData(dzsj, res.message.content);
		},
		error: function(err) {
			console.log(err)
		}
	});
	//展示数据的方法
	function showData(time,content){
		var b = $('<div class="notice_each"><div class="notice_time">' + time + '</div><div class="notice_con"><p>' + content +'</p></div></div>');
		$(".notice_content").append(b);
	}
	
	//将时间戳转化成年月日
	function get_Date(tm) {
		var d = new Date(tm * 1000); //根据时间戳生成的时间对象 
		var date = (d.getFullYear()) + "-" +
			(d.getMonth() + 1) + "-" +
			(d.getDate());
		return date;
	}
});
